From eae0570a1cae446838f58c7e8c2d2ae6e998811b Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 15 Oct 2023 02:11:00 -0600 Subject: input_common: udp: Avoid crash when trying to map motion before client is ready --- src/input_common/drivers/udp_client.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index 808b21069..77db60e92 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp @@ -338,6 +338,7 @@ void UDPClient::StartCommunication(std::size_t client, const std::string& host, for (std::size_t index = 0; index < PADS_PER_CLIENT; ++index) { const PadIdentifier identifier = GetPadIdentifier(client * PADS_PER_CLIENT + index); PreSetController(identifier); + PreSetMotion(identifier, 0); } } -- cgit v1.2.3